// 工作交接申请
var workColumns = [{
  id: 'proName',
  title: '项目名称',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'role',
  title: '阶段目标',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'level',
  title: '标准任务',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'time',
  title: '关键成果',
  // width: 300,
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'user',
  title: '交接人',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'tf',
  title: '状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'operation',
  title: '操作',
  width: 110,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-success" onclick="" data-toggle="modal" href="#myModal"><i class="icon-retweet"></i>  选择交接人</button>';
    // content += '  ';
    // content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}];
var workOption = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    proName: '项目名称测试数据',
    role: '阶段目标测试数据',
    level: '标准任务测试数据',
    time: '关键成果测试数据',
    tf: '已申请',
    user: '张三',
  }, {
    proName: '项目名称测试数据',
    role: '阶段目标测试数据',
    level: '标准任务测试数据',
    time: '关键成果测试数据',
    tf: '未申请',
    user: '',
  }, ],
  columns: workColumns,
  gridContainer: 'workContainer',
  toolbarContainer: 'workToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var workGrid = $.fn.dlshouwen.grid.init(workOption);
$(function () {
  workGrid.load();
});

// 物资清退申请
var prdColumns = [{
  id: 'p1',
  title: '资产编号',
  width: 160,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p2',
  title: '资产类目',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p3',
  title: '资产类别',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p4',
  title: '目前状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p5',
  title: '放置地点',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p6',
  title: '归属者',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p7',
  title: '归属项目',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p8',
  title: '资产描述',
  // width: 150,
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'p9',
  title: '状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'operation',
  title: '操作',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-success" onclick="tsub()"><i class="icon-hand-up"></i>  申请退回</button>';
    // content += '  ';
    // content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}];
var prdOption = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    p1: 'NJSTS201801021800',
    p2: '办公',
    p3: '笔记本',
    p4: '占用',
    p5: '南京',
    p6: '张三',
    p7: '项目名称',
    p8: '资产描述',
    p9: '已申请',
  }, ],
  columns: prdColumns,
  gridContainer: 'prdContainer',
  toolbarContainer: 'prdToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var prdGrid = $.fn.dlshouwen.grid.init(prdOption);
$(function () {
  prdGrid.load();
});


// 证书退回申请
var bookColumns = [{
  id: 'b1',
  title: '证书编号',
  width: 160,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b2',
  title: '证书类型',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b3',
  title: '证书有效期',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b4',
  title: '证书所有人',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b5',
  title: '当前使用人',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b6',
  title: '备注说明',
  // width: 75,
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'b7',
  title: '状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'operation',
  title: '操作',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-success" onclick="tsub()"><i class="icon-hand-up"></i>  申请退回</button>';
    // content += '  ';
    // content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}];
var bookOption = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    b1: 'NJ201001021233123A',
    b2: '高级证书',
    b3: '2018/01/02~2019/01/02',
    b4: '张三',
    b5: '李四',
    b6: '测试数据',
    b7: '已申请',
  }, ],
  columns: bookColumns,
  gridContainer: 'bookContainer',
  toolbarContainer: 'bookToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var bookGrid = $.fn.dlshouwen.grid.init(bookOption);
$(function () {
  bookGrid.load();
});

function tsub() {
  layer.confirm('确认执行此操作？', {
    btn: ['确认', '取消'] //按钮
  }, function () {
    layer.msg('申请成功', {
      icon: 1
    });
  });
};

// 工作交接申请-审批
var work1Columns = [{
  id: 'proName',
  title: '项目名称',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'role',
  title: '阶段目标',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'level',
  title: '标准任务',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'time',
  title: '关键成果',
  // width: 300,
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'user',
  title: '交接人',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'tf',
  title: '状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, ];
var work1Option = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    proName: '项目名称测试数据',
    role: '阶段目标测试数据',
    level: '标准任务测试数据',
    time: '关键成果测试数据',
    tf: '已申请',
    user: '张三',
  }, {
    proName: '项目名称测试数据',
    role: '阶段目标测试数据',
    level: '标准任务测试数据',
    time: '关键成果测试数据',
    tf: '未申请',
    user: '',
  }, ],
  columns: work1Columns,
  gridContainer: 'work1Container',
  toolbarContainer: 'work1ToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var work1Grid = $.fn.dlshouwen.grid.init(work1Option);
$(function () {
  work1Grid.load();
});

// 物资清退申请-审批
var prd1Columns = [{
  id: 'p1',
  title: '资产编号',
  width: 160,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p2',
  title: '资产类目',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p3',
  title: '资产类别',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p4',
  title: '目前状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p5',
  title: '放置地点',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p6',
  title: '归属者',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p7',
  title: '归属项目',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p8',
  title: '资产描述',
  // width: 150,
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'p9',
  title: '状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, ];
var prd1Option = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    p1: 'NJSTS201801021800',
    p2: '办公',
    p3: '笔记本',
    p4: '占用',
    p5: '南京',
    p6: '张三',
    p7: '项目名称',
    p8: '资产描述',
    p9: '已申请',
  }, ],
  columns: prd1Columns,
  gridContainer: 'prd1Container',
  toolbarContainer: 'prd1ToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var prd1Grid = $.fn.dlshouwen.grid.init(prd1Option);
$(function () {
  prd1Grid.load();
});


// 证书退回申请
var book1Columns = [{
  id: 'b1',
  title: '证书编号',
  width: 160,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b2',
  title: '证书类型',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b3',
  title: '证书有效期',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b4',
  title: '证书所有人',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b5',
  title: '当前使用人',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b6',
  title: '备注说明',
  // width: 75,
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'b7',
  title: '退回申请',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, ];
var book1Option = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    b1: 'NJ201001021233123A',
    b2: '高级证书',
    b3: '2018/01/02~2019/01/02',
    b4: '张三',
    b5: '李四',
    b6: '测试数据',
    b7: '已申请',
  }, ],
  columns: book1Columns,
  gridContainer: 'book1Container',
  toolbarContainer: 'book1ToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var book1Grid = $.fn.dlshouwen.grid.init(book1Option);
$(function () {
  book1Grid.load();
});

// 工作交接申请-确认交接
var work2Columns = [{
  id: 'proName',
  title: '项目名称',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'role',
  title: '阶段目标',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'level',
  title: '标准任务',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'time',
  title: '关键成果',
  // width: 300,
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'user',
  title: '交接人',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'tf',
  title: '状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'operation',
  title: '操作',
  width: 110,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-success" onclick="workent()"><i class="icon-retweet"></i>  确认交接</button>';
    // content += '  ';
    // content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}];
var work2Option = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    proName: '项目名称测试数据',
    role: '阶段目标测试数据',
    level: '标准任务测试数据',
    time: '关键成果测试数据',
    tf: '已交接',
    user: '张三',
  }, {
    proName: '项目名称测试数据',
    role: '阶段目标测试数据',
    level: '标准任务测试数据',
    time: '关键成果测试数据',
    tf: '已申请',
    user: '',
  }, ],
  columns: work2Columns,
  gridContainer: 'work2Container',
  toolbarContainer: 'work2ToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var work2Grid = $.fn.dlshouwen.grid.init(work2Option);
$(function () {
  work2Grid.load();
});

function workent() {
  layer.confirm('确认执行此操作？', {
    btn: ['确认', '取消'] //按钮
  }, function () {
    layer.msg('确认成功', {
      icon: 1
    });
  });
}

// 物资清退申请-确认接收
var prd2Columns = [{
  id: 'p1',
  title: '资产编号',
  width: 160,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p2',
  title: '资产类目',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p3',
  title: '资产类别',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p4',
  title: '目前状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p5',
  title: '放置地点',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p6',
  title: '归属者',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p7',
  title: '归属项目',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'p8',
  title: '资产描述',
  // width: 150,
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'p9',
  title: '状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'operation',
  title: '操作',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-success" onclick="workent()"><i class="icon-hand-up"></i>  确认接收</button>';
    // content += '  ';
    // content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}];
var prd2Option = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    p1: 'NJSTS201801021800',
    p2: '办公',
    p3: '笔记本',
    p4: '占用',
    p5: '南京',
    p6: '张三',
    p7: '项目名称',
    p8: '资产描述',
    p9: '已接收',
  }, ],
  columns: prd2Columns,
  gridContainer: 'prd2Container',
  toolbarContainer: 'prd2ToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var prd2Grid = $.fn.dlshouwen.grid.init(prd2Option);
$(function () {
  prd2Grid.load();
});


// 证书退回申请-确认退回
var book2Columns = [{
  id: 'b1',
  title: '证书编号',
  width: 160,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b2',
  title: '证书类型',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b3',
  title: '证书有效期',
  width: 150,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b4',
  title: '证书所有人',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b5',
  title: '当前使用人',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'b6',
  title: '备注说明',
  // width: 75,
  type: 'string',
  columnClass: 'text-left',
}, {
  id: 'b7',
  title: '状态',
  width: 75,
  type: 'string',
  columnClass: 'text-center',
}, {
  id: 'operation',
  title: '操作',
  width: 100,
  type: 'string',
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '';
    content += '<button class="btn btn-xs btn-success" onclick="tsub()"><i class="icon-hand-up"></i>  确认退回</button>';
    // content += '  ';
    // content += '<button class="btn btn-xs btn-danger" onclick="del(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
    return content;
  }
}];
var book2Option = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '项目管理',
  datas: [{
    b1: 'NJ201001021233123A',
    b2: '高级证书',
    b3: '2018/01/02~2019/01/02',
    b4: '张三',
    b5: '李四',
    b6: '测试数据',
    b7: '已退回',
  }, ],
  columns: book2Columns,
  gridContainer: 'book2Container',
  toolbarContainer: 'book2ToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var book2Grid = $.fn.dlshouwen.grid.init(book2Option);
$(function () {
  book2Grid.load();
});